package com.slz3.business.module.configManagement.conActivityForecast.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.configManagement.conActivityForecast.domain.ConActivityForecast;
import com.slz3.business.module.configManagement.conActivityForecast.domain.ConActivityForecastCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class ConActivityForecastResAtomic {

    static Mono<ServerResponse> add_$ConActivityForecastUpdateLock(ServerRequest req, ConActivityForecast conActivityForecast) {
        return ConActivityForecastResSafeValid.add(req, conActivityForecast) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConActivityForecastResExecutor.add(req, conActivityForecast);
    }

    public static Mono<ServerResponse> delete_$ConActivityForecastUpdateLock(ServerRequest req, ConActivityForecastCondition conActivityForecastCondition) {
        return ConActivityForecastResSafeValid.delete(req, conActivityForecastCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConActivityForecastResExecutor.delete(req);
    }

    static Mono<ServerResponse> modify_$ConActivityForecastUpdateLock(ServerRequest req, ConActivityForecast conActivityForecast) {
        return ConActivityForecastResSafeValid.modify(req, conActivityForecast) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConActivityForecastResExecutor.modify(req, conActivityForecast);
    }

    static Mono<ServerResponse> info_$ConActivityForecastUpdateLock(ServerRequest req) {
        return ConActivityForecastResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConActivityForecastResExecutor.info(req);
    }

    public static Mono<ServerResponse> auditSubmit_$ConActivityForecastUpdateLock(ServerRequest req, ConActivityForecastCondition conActivityForecastCondition) {
        return ConActivityForecastResSafeValid.auditSubmit(req, conActivityForecastCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConActivityForecastResExecutor.auditSubmit(req);
    }

    public static Mono<ServerResponse> audit_$ConActivityForecastUpdateLock(ServerRequest req, ConActivityForecastCondition conActivityForecastCondition) {
        return ConActivityForecastResSafeValid.audit(req, conActivityForecastCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConActivityForecastResExecutor.audit(req);
    }

    public static Mono<ServerResponse> auditReject_$ConActivityForecastUpdateLock(ServerRequest req, ConActivityForecastCondition conActivityForecastCondition) {
        return ConActivityForecastResSafeValid.auditReject(req, conActivityForecastCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConActivityForecastResExecutor.auditReject(req);
    }


    public static Mono<ServerResponse> usingEnable_$ConActivityForecastUpdateLock(ServerRequest req, ConActivityForecastCondition conActivityForecastCondition) {
        return ConActivityForecastResSafeValid.usingEnable(req, conActivityForecastCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConActivityForecastResExecutor.usingEnable(req);
    }

    public static Mono<ServerResponse> usingDisable_$ConActivityForecastUpdateLock(ServerRequest req, ConActivityForecastCondition conActivityForecastCondition) {
        return ConActivityForecastResSafeValid.usingDisable(req, conActivityForecastCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConActivityForecastResExecutor.usingDisable(req);
    }
}
